package com.jiangjiang.eshop.wms.stock;

import java.util.Objects;

/**
 * @Author Jianghaowen
 * @Date 2021/9/14
 * @Description: TODO
 * @Version V1.0
 **/
public abstract class AbstractWmsStockUpdater implements WmsStockUpdater {


    /**
     * 执行库存更新逻辑
     *
     * @return 处理结果
     * @throws Exception
     */
    @Override
    public Boolean update() throws Exception {
        updateGoodsStock();
        updateGoodsAllocationStock();
        updateGoodsAllocationStockDetail();
        return true;
    }

    /**
     * 更新商品库存
     *
     * @throws Exception
     */
    protected abstract void updateGoodsStock() throws Exception;

    /**
     * 更新货位库存
     *
     * @throws Exception
     */
    protected abstract void updateGoodsAllocationStock() throws Exception;


    /**
     * 更新货位明细库存
     *
     * @throws Exception
     */
    protected abstract void updateGoodsAllocationStockDetail() throws Exception;


}
